﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Young3.FMSearch.Core.Entities.InGame;

namespace Young3.FMSearch.Core.Entities.InGame
{
    public static partial class PositionalRatings
    {
        private static Func<PlayerSkills, decimal> __tsRatings = null;
        public static Func<PlayerSkills, decimal> TargetStrikerRatings
        {
            get
            {
                if (__tsRatings == null)
                {
                    __tsRatings = (p) =>
                        (Convert.ToDecimal(
                        p.Crossing*20+
                        p.Dribbling*40+
                        p.Finishing*80+
                        p.FirstTouch*40+
                        p.Heading*100+
                        p.Passing*40+
                        p.Technique*40+
                        p.Anticipation*40+
                        p.Bravery*20+
                        p.Composure*40+
                        p.Concentration*10+
                        p.Creativity*20+
                        p.Decisions*20+
                        p.Influence*10+
                        p.OffTheBall*100+
                        p.Positioning*20+
                        p.Teamwork*10+
                        p.Workrate*20+

                        p.Acceleration*50+
                        p.Agility*30+
                        p.Balance*20+
                        p.Jumping*100+
                        p.Pace*50+
                        p.Stamina*20+
                        p.Strength*100
                        )
                        / Convert.ToDecimal((20+40+80+40+100+40+40+40+20+40+10+20+20+10+100+20+10+20
                        +50+30+20+100+50+20+100) * 100));
                }
                return __tsRatings;
            }
        }
    }
}
